package cn.zm.trip.web.service.impl;

import cn.zm.trip.web.dao.WordsDao;
import cn.zm.trip.web.domain.Reply;
import cn.zm.trip.web.domain.WordStatisticsEntity;
import cn.zm.trip.web.domain.Words;
import cn.zm.trip.web.service.WordsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WordsServiceImpl extends ServiceImpl<WordsDao, Words> implements WordsService {

    @Autowired
    WordsDao wordsDao;

    /**
     * 保存留言信息功能
     * @param words
     * @return
     */
    @Override
    public void saveWords(Words words) {
        wordsDao.saveWords(words);
    }
    /**
     * 保存回复信息
     * @param reply
     */
    @Override
    public void saveReply(Reply reply) {
        wordsDao.saveReply(reply);
    }
    /**
     * 查询所有留言信息
     * @return
     */
    @Override
    public List<Words> findByWords() {
        return wordsDao.findByWords();
    }
    /**
     * 	查询所有回复信息
     */
    @Override
    public List<Reply> findByReply() {
        return wordsDao.findByReply();
    }

    @Override
    public List<WordStatisticsEntity> listWordStaticsByWordQuery(Integer viewPointId,Integer hotelId,Integer foodId) {
        return wordsDao.listWordStaticsByWordQuery(viewPointId,hotelId,foodId);
    }
}
